<?php
if( isset( $_GET['files'] ) )
	$files = $_GET['files'];
else
if( isset( $argc ) && isset( $argv ) )
	{
	$files = $argv;
	unset( $files[0] );
	}
else
	{
	# add your files here
	$files = array(
		'site.css',
		);
	}

$__path = realpath( dirname( __FILE__ ) );
$__path = preg_replace( "/^\/?(.*?)\/?$/mis", "$1/", $__path );
if( !strpos( $__path, ":\\" ) )
   $__path = "/$__path";

define( 'FILE_ROOT',		$__path );
define( 'CSS_ROOT',		FILE_ROOT );
include_once('css2ie6.php');

/******************************************************************************************************/	
/* CONVERT ONE OR MORE .CSS FILES TO BE IE6 COMPLIANT */

# the CSS to be send to the browser	
$css_content = '';	

# get each input file and  IE6's them
foreach( $files as $file )
	{
	if( file_exists( CSS_ROOT . $file ) )
		{
		$css_content .= css2ie6_file( CSS_ROOT . $file );
		}
	}

if( isset( $argc ) && isset( $argv ) )
	{
	file_put_contents( CSS_ROOT . 'ie6_calculated.css', $css_content );
	}
else
	{
	header('content-type:text/css');
	echo file_get_contents( CSS_ROOT . 'ie6.css' );
	echo $css_content;
	}
?>